package ooday04;

public class Test {
    public static void main(String[] args) {
        Person[] ps = new Person[8];
        ps[0] = new Student("jake",24,"渝中区","1");
        ps[1] = new Student("join",25,"巴南区","2");
        ps[2] = new Student("milan",26,"渝北区","3");
        ps[3] = new Teacher("zs",33,"渝中区",3330);
        ps[4] = new Teacher("li",34,"巴南区",3440);
        ps[5] = new Teacher("ww",35,"渝北区",5330);
        ps[6] = new Doctor("tom",44,"渝中区","中级");
        ps[7] = new Doctor("dc",55,"巴南区","高级");
        for (int i = 0; i < ps.length; i++) {
            System.out.println(ps[i].name);
            ps[i].sayHi();
        }
        Person[] ps1 = new Person[8];


    }
}

